package com.moge.anjian.activities;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.RelativeLayout;

import androidx.activity.ComponentActivity;
import androidx.annotation.Nullable;

import com.moge.anjian.R;

public class TestActivity extends ComponentActivity {

    RelativeLayout rootView;

    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);

        rootView = findViewById(R.id.root_view);
        rootView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                Log.e("dimoge", "测试界面被点了:" + event.getAction() + ", xy=" + event.getRawX() + "," + event.getRawY());
                return false;
            }
        });
    }
}
